﻿using MyBlog.IRepository;
using MyBlog.Model;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace MyBlog.Repository
{
    public class BlogNewsRepository : BaseRepository<BlogNews>, IBlogNewsRepository
    {
        public Task<List<BlogNews>> NavigateQueryAsync()
        {
            return base.Context.Queryable<BlogNews>()
                .Mapper(c => c.WriteInfo, c => c.WriteId, c => c.WriteInfo.Id)
                .Mapper(c => c.TypeInfo, c => c.TypeId, c => c.TypeInfo.Id)
                .ToListAsync();
        }
    }
}
